home *** CD-ROM | disk | FTP | other *** search
/ Champak 142 / Volume 142 Oct 17 2011 - Damaged.iso / Games / operation-graduates.swf / scripts / DefineSprite_915_selectah / frame_1 / DoAction.as
Text File  |  2011-10-17  |  945b  |  36 lines

  1. n1.gotoAndStop("inactive");
  2. n2.gotoAndStop("inactive");
  3. n3.gotoAndStop("inactive");
  4. n4.gotoAndStop("inactive");
  5. n5.gotoAndStop("inactive");
  6. i = 1;
  7. while(i <= 5)
  8. {
  9.    eval("n" + i).hitArea = eval("n" + i + ".ha");
  10.    eval("n" + i).myNumbuh = i;
  11.    eval("n" + i).onDragOver = eval("n" + i).onRollOver = function()
  12.    {
  13.       _root.playSound("sound.rollover");
  14.       this.gotoAndStop("active");
  15.       this.ha._visible = false;
  16.    };
  17.    eval("n" + i).onDragOut = eval("n" + i).onRollOut = function()
  18.    {
  19.       this.gotoAndStop("inactive");
  20.       this.ha._visible = true;
  21.    };
  22.    eval("n" + i).onPress = function()
  23.    {
  24.       _root.playSound("sound.onpress");
  25.    };
  26.    eval("n" + i).onRelease = function()
  27.    {
  28.       var _loc1_ = _root;
  29.       _loc1_.playSound("sound.onrelease");
  30.       _loc1_.pickedNumbuh = this.myNumbuh;
  31.       _loc1_.initInstructions();
  32.       _loc1_.selectah.removeMovieClip();
  33.    };
  34.    i++;
  35. }
  36.